package cn.lixu.block;

import cn.lixu.domain.User;
import com.alibaba.csp.sentinel.slots.block.BlockException;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author LiXu
 * @date 2022/08/23 0023 16:16:45
 * 降级类
 */
public class UserBlock {

    public static User sentinelMethod(@PathVariable("id") Long id, BlockException e) {
        e.printStackTrace();
        return new User(-1L, "服务降级触发", "快去了，快去了，那里不行");
    }
}
